repeat with x = 1 to the number of chars in process
get char x of process
if it is ";" then put "," into char x of process
end repeat
if word 1 of process is "Deleted:" then
beep
do restext("TEXT", "Exit", colorauthoringpath)
end if
if word 1 of process is "Added:" then delete word 1 of process
if item 1 of process is "PICT" then
if item 2 of process is "<unnamed>" then put item 3 of process into Preview
else
put item 2 of process into Preview
end if
picture Preview , resource, windoid, true
end if
if item 1 of process is "snd " then
if item 2 of process is not "<unnamed>" then
put item 2 of process into TheSound
play TheSound
do restext("TEXT", "Exit", colorauthoringpath)
end if
put selectedline of window where into replaceline
put the text of window where into theTEXT
put item 1 of process into whatKind
put item 2 of process into itsoldName
put item 3 of process into itsID
do showdialog 2, "505", , , "Untitled"
if the result is empty then do restext("TEXT", "Exit", colorauthoringpath)
put line 1 of the result into newname
do put FullResList("T=snd ", "O=N", "W=" & thestack) into check
do get offset (newname, check)
if it is "0" then
do RenameRes(thestack, itsID, whatkind, itsoldName, newname)
put newName into item 2 of process
put process into line replaceline of theText
set the text of window where to theTEXT
put item 2 of process into TheSound
do stop using stack thestack
do start using stack thestack
play TheSound
do restext("TEXT", "Exit", colorauthoringpath)
end if
if it is not "0" then
do showdialog 1, "506","You must have a unique name for your sound in order for HyperCard to play it predictably. Please try another name." , "True"
if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)
if the result is "1" then
repeat
do showdialog 2, "505", , , "Untitled"
if the result is empty then do restext("TEXT", "Exit", colorauthoringpath)
if the result is "2" then do restext("TEXT", "Exit", colorauthoringpath)
put line 1 of the result into newname
do put FullResList("T=snd ", "O=N" , "W=" & thestack) into check
do get offset (newname, check)
if it is "0" then
do RenameRes(thestack, itsID, whatkind, itsoldName, newname)
put newName into item 2 of process
put process into line replaceline of theText
set the text of window where to theTEXT
do stop using stack thestack
do start using stack thestack
do put newname into TheSound
do play TheSound
do restext("TEXT", "Exit", colorauthoringpath)
end if
if it is not "0" then do showdialog 1, "506","You must have a unique name for your sound in order for HyperCard to play it predictably. Please try another name.", "True"